package org.aphelie.chronicle.character.drawer;

import org.aphelie.chronicle.ChroniclePackage;
import org.aphelie.chronicle.character.CharacterPackage;
import org.eclipse.emf.ecp.edit.internal.swt.util.SWTControl;
import org.eclipse.emf.ecp.view.spi.custom.swt.ECPAbstractCustomControlSWT;
import org.eclipse.emf.ecp.view.spi.renderer.NoPropertyDescriptorFoundExeption;
import org.eclipse.emf.ecp.view.spi.renderer.NoRendererFoundException;
import org.eclipse.emf.ecp.view.spi.swt.layout.GridDescriptionFactory;
import org.eclipse.emf.ecp.view.spi.swt.layout.SWTGridCell;
import org.eclipse.emf.ecp.view.spi.swt.layout.SWTGridDescription;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;

public class ArcTupleControl extends ECPAbstractCustomControlSWT {

	public ArcTupleControl() {
		// TODO Auto-generated constructor stub
	}

	@Override
	protected void disposeCustomControl() {
		// TODO Auto-generated method stub

	}

	@Override
	protected void handleContentValidation() {
		// TODO Auto-generated method stub

	}

	@Override
	public SWTGridDescription getGridDescription() {
		return GridDescriptionFactory.INSTANCE.createSimpleGrid(1, 1, null);
	}

	@Override
	public Control renderControl(SWTGridCell cell, Composite parent)
			throws NoRendererFoundException, NoPropertyDescriptorFoundExeption {
	        Composite control =new Composite(parent, SWT.NONE);
	        control .setLayout(new FillLayout(SWT.VERTICAL));
	        
	        Label userAttributes=new Label(control , SWT.NONE);
	        userAttributes.setText("User Attributes");
	        userAttributes.setAlignment(SWT.CENTER);
	        
	        //getControl(SWTControl.class,getResolvedDomainModelReference(ChroniclePackage.eINSTANCE.getArcTopic_Name())).createControl(control );
	        getControl(SWTControl.class,getResolvedDomainModelReference(ChroniclePackage.eINSTANCE.getArcTuple_Overall())).createControl(control );
	        
	        return control ;
	}

}
